/*
	writeBackDataMux
*/
module gprWriteBackDataMux
(
	input	wire			gprWriteBackFromALU,
	input	wire			gprWriteBackFromSpecialAdder,
	input	wire			gprWriteBackFromPcPlus4,
	input	wire			gprWriteBackFromLSU,

	
	input	wire	[31:0]	aluRes,
	input	wire	[31:0]	specialAdderRes,
	input	wire	[31:0]	pcPlus4Res,
	input	wire	[31:0]	lsuDataOut,
	
	output	wire	[31:0]	gprWriteBackData
);

	assign	gprWriteBackData = 	(gprWriteBackFromALU 			? aluRes 			: 32'b0)|	
								(gprWriteBackFromSpecialAdder 	? specialAdderRes 	: 32'b0)|
								(gprWriteBackFromPcPlus4 		? pcPlus4Res	 	: 32'b0)|
								(gprWriteBackFromLSU			? lsuDataOut		: 32'b0);					
endmodule

